From 5778c9d31c15887eded142becf33ff9eb72e9bf8 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Wed, 17 Sep 2008 19:38:41 +0000 Subject: [PATCH] waypt: Add function 'waypt_empty_gc_data' to test the state of waypoints gc_data. --- gpsbabel/defs.h | 1 + gpsbabel/waypt.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/gpsbabel/defs.h b/gpsbabel/defs.h index cb2590aaa..ae5fbcb8b 100644 --- a/gpsbabel/defs.h +++ b/gpsbabel/defs.h @@ -546,6 +546,7 @@ waypoint * find_waypt_by_name(const char *name); void waypt_backup(signed int *count, queue **head_bak); void waypt_restore(signed int count, queue *head_bak); geocache_data *waypt_alloc_gc_data(waypoint *wpt); +int waypt_empty_gc_data(const waypoint *wpt); route_head *route_head_alloc(void); void route_add (waypoint *); diff --git a/gpsbabel/waypt.c b/gpsbabel/waypt.c index 065f388dd..de4fa17e3 100644 --- a/gpsbabel/waypt.c +++ b/gpsbabel/waypt.c @@ -627,3 +627,9 @@ waypt_alloc_gc_data(waypoint *wpt) } return res; } + +int +waypt_empty_gc_data(const waypoint *wpt) +{ + return (wpt->gc_data == &empty_gc_data); +} -- 2.30.2